<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::TwoStateSpace&lt; State1, State2 &gt; Struct Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="structshark_1_1_two_state_space.html">TwoStateSpace</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="structshark_1_1_two_state_space-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::TwoStateSpace&lt; State1, State2 &gt; Struct Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="structshark_1_1_two_state_space.html" title="The TwoStateSpace is a discrete Space with only two values, for example {0,1} or {-1,...">TwoStateSpace</a> is a discrete Space with only two values, for example {0,1} or {-1,1}.  
 <a href="structshark_1_1_two_state_space.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_two_state_space_8h_source.html">shark/Unsupervised/RBM/StateSpaces/TwoStateSpace.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a635e02bf8d7e457bebe693aa4fcf02a2" id="r_a635e02bf8d7e457bebe693aa4fcf02a2"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1tags_1_1_discrete_space.html">tags::DiscreteSpace</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_two_state_space.html#a635e02bf8d7e457bebe693aa4fcf02a2">EnumerationTag</a></td></tr>
<tr class="memdesc:a635e02bf8d7e457bebe693aa4fcf02a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag which tells an approximating function of the partition function, that this space can be enumerated.  <br /></td></tr>
<tr class="separator:a635e02bf8d7e457bebe693aa4fcf02a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ad19d005ed40ab4cfb59255d386965296" id="r_ad19d005ed40ab4cfb59255d386965296"><td class="memItemLeft" align="right" valign="top">static std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_two_state_space.html#ad19d005ed40ab4cfb59255d386965296">numberOfStates</a> (std::size_t numberOfNeurons)</td></tr>
<tr class="memdesc:ad19d005ed40ab4cfb59255d386965296"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of states a vector of n random variables (neurons) with values in this state space may have.  <br /></td></tr>
<tr class="separator:ad19d005ed40ab4cfb59255d386965296"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71d5152fbe88352cff723e7d5a2f9c0f" id="r_a71d5152fbe88352cff723e7d5a2f9c0f"><td class="memTemplParams" colspan="2">template&lt;class V &gt; </td></tr>
<tr class="memitem:a71d5152fbe88352cff723e7d5a2f9c0f"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_two_state_space.html#a71d5152fbe88352cff723e7d5a2f9c0f">state</a> (V &amp;&amp;vec, std::size_t stateNumber)</td></tr>
<tr class="memdesc:a71d5152fbe88352cff723e7d5a2f9c0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the i-th state vector for a matrix row.  <br /></td></tr>
<tr class="separator:a71d5152fbe88352cff723e7d5a2f9c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;int State1, int State2&gt;<br />
struct shark::TwoStateSpace&lt; State1, State2 &gt;</div><p>The <a class="el" href="structshark_1_1_two_state_space.html" title="The TwoStateSpace is a discrete Space with only two values, for example {0,1} or {-1,...">TwoStateSpace</a> is a discrete Space with only two values, for example {0,1} or {-1,1}. </p>

<p class="definition">Definition at line <a class="el" href="_two_state_space_8h_source.html#l00041">41</a> of file <a class="el" href="_two_state_space_8h_source.html">TwoStateSpace.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a635e02bf8d7e457bebe693aa4fcf02a2" name="a635e02bf8d7e457bebe693aa4fcf02a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a635e02bf8d7e457bebe693aa4fcf02a2">&#9670;&#160;</a></span>EnumerationTag</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int State1, int State2&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structshark_1_1tags_1_1_discrete_space.html">tags::DiscreteSpace</a> <a class="el" href="structshark_1_1_two_state_space.html">shark::TwoStateSpace</a>&lt; State1, State2 &gt;::EnumerationTag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tag which tells an approximating function of the partition function, that this space can be enumerated. </p>

<p class="definition">Definition at line <a class="el" href="_two_state_space_8h_source.html#l00044">44</a> of file <a class="el" href="_two_state_space_8h_source.html">TwoStateSpace.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad19d005ed40ab4cfb59255d386965296" name="ad19d005ed40ab4cfb59255d386965296"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad19d005ed40ab4cfb59255d386965296">&#9670;&#160;</a></span>numberOfStates()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int State1, int State2&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::size_t <a class="el" href="structshark_1_1_two_state_space.html">shark::TwoStateSpace</a>&lt; State1, State2 &gt;::numberOfStates </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>numberOfNeurons</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of states a vector of n random variables (neurons) with values in this state space may have. </p>
<p>For example if {a,b} is the state space it returns the cardinality of the set \( {a,b}^n = 2^n \) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">numberOfNeurons</td><td>the size of the vector </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of States. <br  />
 </dd></dl>

<p class="definition">Definition at line <a class="el" href="_two_state_space_8h_source.html#l00051">51</a> of file <a class="el" href="_two_state_space_8h_source.html">TwoStateSpace.h</a>.</p>

<p class="reference">References <a class="el" href="_exception_8h.html#adce1f80097c69010f5eab2618fa2e971">SHARK_RUNTIME_CHECK</a>.</p>

</div>
</div>
<a id="a71d5152fbe88352cff723e7d5a2f9c0f" name="a71d5152fbe88352cff723e7d5a2f9c0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71d5152fbe88352cff723e7d5a2f9c0f">&#9670;&#160;</a></span>state()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int State1, int State2&gt; </div>
<div class="memtemplate">
template&lt;class V &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="structshark_1_1_two_state_space.html">shark::TwoStateSpace</a>&lt; State1, State2 &gt;::state </td>
          <td>(</td>
          <td class="paramtype">V &amp;&amp;&#160;</td>
          <td class="paramname"><em>vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>stateNumber</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the i-th state vector for a matrix row. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vec</td><td>the vector the i-th state vector is stored in </td></tr>
    <tr><td class="paramname">stateNumber</td><td>the number of the state <br  />
 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_two_state_space_8h_source.html#l00063">63</a> of file <a class="el" href="_two_state_space_8h_source.html">TwoStateSpace.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/shark/Unsupervised/RBM/StateSpaces/<a class="el" href="_two_state_space_8h_source.html">TwoStateSpace.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
